package com.cjh.dao.impl;

import com.cjh.dao.OrderItemDao;
import com.cjh.pojo.OrderItem;

/**
 * @Author: huahua
 * @Date: 2020-09-17 22:07
 */
public class OrderItemDaoImpl extends BaseDao implements OrderItemDao {
    @Override
    public int saveOrderItem(OrderItem orderItem) {
        String sql = "INSERT INTO `book`.`t_order_item`(`name`, `count`, `price`, `total_price`, `order_id`) VALUES (?,?,?,?,?)";
        return update(sql,orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }
}
